package com.shycloud.mido.organ.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.organ.api.entity.WorksEntity;
import com.shycloud.mido.organ.api.vo.RankingVO;
import com.shycloud.mido.organ.api.vo.WorksEntityVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorksMapper extends BaseMapper<WorksEntity> {

	IPage<WorksEntity> getMyWorks(@Param("page") Page page, @Param("memberId") String memberId, @Param("statusArr") String[] statusArr);

	IPage<WorksEntity> getFriendWorks(@Param("page") Page page, @Param("memberId") String memberId);

	IPage<WorksEntity> getNoFriendWorks(@Param("page") Page page, @Param("memberId") String memberId);

	List<WorksEntityVO> getRecommendedWorks(@Param("size") Integer size, @Param("memberId") String memberId);

	List<WorksEntity> getFollowedWorks(@Param("memberId") String memberId, @Param("size") Integer size);

	//获取作品全部id用来在个人详情页滑动加载
	//status: 0:自己 1:好友 2:非好友
	List<String> getWorksIdList(@Param("memberId") String memberId, @Param("status") Integer status);

	IPage<RankingVO> getWorksCountList(@Param("page") Page page);

	IPage<RankingVO> getRankingAllCountList(@Param("page") Page page);
}
